<template>
  <div>
    <TopNav title="我的收藏" />
    <PostItem :postData="item" v-for="(item,index) in starList" :key="index" class="collection" />
  </div>
</template>

<script>
import TopNav from "@/components/TopNav";
import PostItem from "@/components/PostItem";
export default {
  components: {
    TopNav,
    PostItem
  },
  data() {
    return {
      starList: []
    };
  },
  mounted() {
    this.$axios({
      url: "/user_star",
      method: "GET"
    }).then(res => {
      console.log(res.data);
      this.starList = res.data.data;
    });
  }
};
</script>

<style lang='less'>
.collection {
  margin-top: 4.556vw;
}
</style>